package cn.com.qiancheng.service;

import cn.com.qiancheng.dao.StudentDao;
import cn.com.qiancheng.dto.Student;

public class StudentService {
	public Student validate(String userName, String password) {
		StudentDao dao = new StudentDao();
		Student stu = dao.searchStudentByUserName(userName);
		if (stu != null && stu.getStuPassword().equals(password)) {
			return stu;
		}
		return null;
	}
}
